// #pragma once

#include <climits>
#include <iostream>

inline constexpr uint32_t next_pow_2(uint32_t const num) {
  if (num <= 1) return num;
  return 1 << (CHAR_BIT * sizeof(num) - __builtin_clz(num - 1));
}

int main() {
    uint32_t num;
    scanf("%d", &num);
    std::cout << "Next power of 2 of " << num << " is: " << next_pow_2(num) << std::endl;
    return 0;
}